package com.aiyige.model.request;

import com.aiyige.base.api.ApiManager;

import java.util.List;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by xiachao
 */

public class MyFavoriteRequest {
    List<String> subject;
    long pageNum = 0;
    long pageSize = 10;
    String keyWord;

    private MyFavoriteRequest(Builder builder) {
        subject = builder.subject;
        pageNum = builder.pageNum;
        pageSize = builder.pageSize;
        keyWord = builder.keyWord;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static final class Builder {
        private List<String> subject;
        private long pageNum = 0;
        private long pageSize = 10;
        private String keyWord;

        public Builder() {
        }

        public Builder subject(List<String> subject) {
            this.subject = subject;
            return this;
        }

        public Builder pageNum(long pageNum) {
            this.pageNum = pageNum;
            return this;
        }

        public Builder pageSize(long pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder keyWord(String keyWord) {
            this.keyWord = keyWord;
            return this;
        }

        public Call<ResponseBody> build() {
            return ApiManager.getService().getFavorites(subject,keyWord,pageSize,pageNum);
        }
    }


}
